package com.refactor.demo;

/**
 * RegularMovie
 *
 * @author mashiquan
 * @version 1.0
 * @description
 * @date 2023/12/26 00:06
 */
public class RegularMovie extends MovieStrategy {
    @Override
    String getTypeName() {
        return MovieTypeEnums.REGULAR.getTypeTitle();
    }

    @Override
    double getCharge(int rentalDays) {
        double amount = 0;
        amount += 2;
        if (rentalDays > 2) {
            amount += (rentalDays - 2) * 1.5;
        }
        return amount;
    }

    @Override
    int getIntegralPoints(int rentalDays) {
        return 1;
    }
}
